-----------------------------------
-- Area: Jugner Forest
-- NPC:  qm2 (???)
-- Quests: Sin Hunting - RNG AF1
-- @zone 104
-- @pos -10.946, -1.000, 313.810
-----------------------------------
package.loaded["scripts/zones/Jugner_Forest/TextIDs"] = nil;
-----------------------------------

require("scripts/globals/settings");
require("scripts/globals/quests");
require("scripts/zones/Jugner_Forest/TextIDs");

-----------------------------------
-- onTrade
-----------------------------------

function onTrade(player,npc,trade)
end;

-----------------------------------
-- onTrigger
-----------------------------------

function onTrigger(player,npc)
   
  	local SinHunting = player:getVar("sinHunting");	-- RNG AF1 
   
	if(SinHunting == 4 and IsMoonFull() == true) then
		player:startEvent(0x000d, 0, 1107);		
	end
end;

-----------------------------------
-- onEventUpdate
-----------------------------------

function onEventUpdate(player,csid,option)
--printf("CSID: %u",csid);
--printf("RESULT: %u",option);
end;

-----------------------------------
-- onEventFinish
-----------------------------------

function onEventFinish(player,csid,option)
--printf("CSID: %u",csid);
--printf("RESULT: %u",option);

	if(csid == 0x000d) then
		player:setVar("sinHunting",5);
    end
end;